import request from '@/utils/request'
// 获取-分页查询角色列表、
export const getRoleList = (params) => {
  return request.get('/sys/role', {
    params
  })
}
// 新增-角色
export const AddRole = (data) => {
  return request.post('/sys/role', data)
}
// 修改-角色
export const updateRole = (data) => {
  return request.put(`/sys/role/${data.id}`, data)
}
// 删除-角色
export const DeleteRole = (id) => {
  return request.delete(`/sys/role/${id}`)
}
// 获取角色详情
export const getRoleDetail = (id) => {
  return request.get(`/sys/role/${id}`)
}
// 分配权限-角色
export const assignPremission = (data) => {
  return request.put('/sys/role/assignPrem', data)
}
